import httpmaker from '@/utils/initAxios'
import md5 from 'js-md5'
export const userRegist = function (loginForm) {
  const param = new URLSearchParams()
  param.append('user', loginForm.user)
  // 将注册密码加密
  param.append('pwd', md5(loginForm.pwd))
  return httpmaker.post('user/regist/', param)
}
export const userLogin = function (loginForm) {
  const param = new URLSearchParams()
  param.append('user', loginForm.user)
  param.append('pwd', md5(loginForm.pwd))
  return httpmaker.post('user/login/', param)
}
